<!--
 * @Author: zengwj
 * @Date: 2022-08-08 17:02:46
 * @LastEditors: zengwj
 * @LastEditTime: 2022-08-08 18:13:11
 * @Description: 
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>

    const data = {}
    data.__proto__._data = {
      c: () => {
        return 1
      }
    }
    function Proxy(target, sourceKey, key) {
      Object.defineProperty(target, key, {
        value: (...args) => {
          console.log(...args)
        },
        get() {
          return target[sourceKey][key]
        },
        set(newV) {
          target[sourceKey][key] = newV
        },
      })
    }
    Proxy(data, '_data', 'c')

    console.log(data.c)


  </script>
</body>

</html>